#include <iostream>
#include <vector>
using namespace std;

int main() {
    int n, k;
    cin >> n >> k;
    vector<int> happy(n);
    vector<int> shame(n);
    for (int i = 0; i < n; i++) {
        cin >> happy[i];
    }
    for (int i = 0; i < n; i++) {
        cin >> shame[i];
    }

    int left = 0;
    int right = 0;
    int h = 0;
    int s = 0;
    int hmax = 0;
    int smin = 0;
    int ret = 0;
    while (right < n) {
        h += happy[right];
        s += shame[right];
        while (right - left + 1 > k) {
            h -= happy[left];
            s -= shame[left];
            left++;
        }
        if (right - left + 1 == k) {
            if (h > hmax) {
                ret = left;
                hmax = h;
                smin = s;
            }
            else if (h == hmax && s < smin) {
                ret = left;
                hmax = h;
                smin = s;
            }
        }

        right++;


    }

    cout << ret;

    return 0;
}
